<!DOCTYPE html>
<html>
<head>
<title>validate验证框架演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Page-Enter"
	content="revealTrans(duration=1, transition=2)" />
<meta http-equiv="Page-Exit"
	content="revealTrans(duration=1, transition=2)" />
<link type="text/css" rel="stylesheet"
	href="../js/validate/css/validate.css" />
<script src="./jquery-1.6.4.js" language="javascript"></script>
<script src="../js/validate/talent-validate-all.js"
	language="javascript"></script>
<script src="./demo.js" language="javascript"></script>

<link type="text/css" rel="stylesheet" href="../Styles/SyntaxHighlighter.css" />
	<link type="text/css" rel="stylesheet" href="./demo.css" />
	<script src="../Scripts/shCore.js" type="text/javascript"></script>
	<script src="../Scripts/shBrushJScript.js" type="text/javascript"></script>
	<script src="../Scripts/shBrushJava.js" type="text/javascript"></script>
</head>
<body>
	<form name="form1">
		<div id='inputId'>
			name="n1"<input type="text" value="11" name="n1" /><br /> id="id2"<input
				type="text" value="22" id="id2" /><br /> id="id3"
			<textarea id="id3" cols="40" rows="5">33</textarea>
			<br /> 修改表达式
			<textarea cols="40" rows="6" id='exp_div1'
				onkeyup="modifyExp1('exp_div1', expv1)">#{id2} == #{id3} + ${n1}</textarea>
			在这里修改表达式进行测试 <br />

		</div>
		<div id='msgId'></div>

		<br /> <br /> <br />
		<div id='inputId2'>
			name="nn1"<input type="text" value="11" name="nn1" /><br />
			id="idid2"<input type="text" value="22" id="idid2" /><br />
			id="idid3"
			<textarea id="idid3" cols="40" rows="5">33</textarea>
			<br /> <br />

		</div>
		<div id='msgId2'></div>
		<input type="button" class='button' value="验证" onclick="tt.validate()" />




	</form>
</body>
<script id="talent_script">
			var expv1 = new tt.ExpV().addId('inputId').setMsgId('msgId').set("#{id2} == #{id3} + ${n1}").setI18("表达式：#{id2} == #{id3} + ${n1} 即[{1}]不成立！");
			
			var expv2 = new tt.ExpV().addId('inputId2').setMsgId('msgId2').set("#{idid3} == (#{idid2} - ${nn1}) / 2").setI18("表达式：#{idid3} == (#{idid2} - ${nn1}) / 2 即[{1}]不成立！");
			
			function modifyExp1(exp_div_id, validator) {
				validator.set(tt.id(exp_div_id).value);
			}
		</script>
</html>
